bitkeeper revision 1.1713.2.6 (42b305b9mdLLzenpwCqtnZeLKLPMXw)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 17 Jun 2005 17:17:45 +0000 (17:17 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 17 Jun 2005 17:17:45 +0000 (17:17 +0000)
Check to ensure no interrupts to deliver before allowing
a guest to "pause" itself

xen/arch/ia64/hypercall.c

index 648bbfbbe8aba444c206ae0892e26a7e7a439a54..79214253650a9e5f9eba553b51f219bed377a042 100644 (file)
@@ -40,6 +40,17 @@ ia64_hypercall (struct pt_regs *regs)
 #endif
                x = pal_emulator_static(regs->r28);
                if (regs->r28 == PAL_HALT_LIGHT) {
+#if 1
+#define SPURIOUS_VECTOR 15
+                       if (vcpu_check_pending_interrupts(v)!=SPURIOUS_VECTOR) {
+//printf("Domain trying to go idle when interrupt pending!\n");
+//this shouldn't happen, but it apparently does quite a bit!  so don't
+//allow it to happen... i.e. if a domain has an interrupt pending and
+//it tries to halt itself because it thinks it is idle, just return here
+//as deliver_pending_interrupt is called on the way out and will deliver it
+                       }
+                       else
+#endif
                        do_sched_op(SCHEDOP_yield);
                        //break;
                }